Implement workspaces in Cargo
authorAlex Crichton <alex@alexcrichton.com>
Sun, 15 May 2016 00:14:24 +0000 (17:14 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Tue, 5 Jul 2016 22:42:22 +0000 (15:42 -0700)
commit58ddb28a4995a9c7e003fffac42a694c2d3ec39b
tree3997ecb7dec3cf54e6f0a75d374b053ee70c85b2
parent5716f32d78b1baf629e055573a682a6730936b4b
Implement workspaces in Cargo

This commit is an implementation of [RFC 1525] which specifies the addition of
**workspaces** to Cargo.

[RFC 1525]: https://github.com/rust-lang/rfcs/blob/master/text/1525-cargo-workspace.md

A workspace is a group of crates which are all compiled into the same output
directory and share the same `Cargo.lock` file. This means that dependencies are
cached between builds as well as dependencies all being shared at the same
versions. An update to any one dependency transitively affects all other members
of the workspace.

Typical repository layouts with a crate at the root and a number of path
dependencies simply need to add the following to the root `Cargo.toml`:

```toml
[workspace]
```

Otherwise more advanced configuration may be necessary through the
`package.workspace` or `workspace.members` keys. More information can be found
as part of [RFC 1525].
48 files changed:
src/bin/bench.rs
src/bin/build.rs
src/bin/clean.rs
src/bin/doc.rs
src/bin/fetch.rs
src/bin/generate_lockfile.rs
src/bin/metadata.rs
src/bin/package.rs
src/bin/pkgid.rs
src/bin/publish.rs
src/bin/run.rs
src/bin/rustc.rs
src/bin/rustdoc.rs
src/bin/test.rs
src/bin/update.rs
src/cargo/core/manifest.rs
src/cargo/core/mod.rs
src/cargo/core/resolver/encode.rs
src/cargo/core/resolver/mod.rs
src/cargo/core/workspace.rs [new file with mode: 0644]
src/cargo/ops/cargo_clean.rs
src/cargo/ops/cargo_compile.rs
src/cargo/ops/cargo_doc.rs
src/cargo/ops/cargo_fetch.rs
src/cargo/ops/cargo_generate_lockfile.rs
src/cargo/ops/cargo_install.rs
src/cargo/ops/cargo_new.rs
src/cargo/ops/cargo_output_metadata.rs
src/cargo/ops/cargo_package.rs
src/cargo/ops/cargo_pkgid.rs
src/cargo/ops/cargo_read_manifest.rs
src/cargo/ops/cargo_run.rs
src/cargo/ops/cargo_rustc/layout.rs
src/cargo/ops/cargo_rustc/mod.rs
src/cargo/ops/cargo_test.rs
src/cargo/ops/lockfile.rs
src/cargo/ops/mod.rs
src/cargo/ops/registry.rs
src/cargo/ops/resolve.rs
src/cargo/sources/git/source.rs
src/cargo/util/config.rs
src/cargo/util/toml.rs
src/doc/manifest.md
src/rustversion.txt
tests/cargotest/support/mod.rs
tests/cross-compile.rs
tests/resolve.rs
tests/workspaces.rs [new file with mode: 0644]